﻿using Blog.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Blog.Repository.Map
{
    public class FriendLinkMap : IEntityTypeConfiguration<FriendLink>
    {
        public void Configure(EntityTypeBuilder<FriendLink> builder)
        {
            builder.ToTable("T_FriendLink");
            builder.HasKey(s => s.Id);
            builder.Property(s => s.Id).HasColumnName("id");
            builder.Property(s => s.Email).HasColumnName("site_email");
            builder.Property(s => s.Name).HasColumnName("site_name");
            builder.Property(s => s.Address).HasColumnName("site_address");
            builder.Property(s => s.Photo).HasColumnName("site_photo");
            builder.Property(s => s.IsPass).HasColumnName("site_ispass");
            builder.Property(s => s.CreateTime).HasColumnName("site_createtime");
            builder.Property(s => s.UpdateTime).HasColumnName("site_updatetime");
        }
    }
}
